package com.book.controller;

import com.book.result.Result;
import com.book.service.ConsumerRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("reader")
public class ReaderController {

    @Autowired
    private ConsumerRecordService consumerRecordService;

    @GetMapping("submitReader")
    public Result submitReader(@RequestHeader String unauthorized, @RequestParam Long money, @RequestParam String remark){
        consumerRecordService.submitReader(unauthorized,money,remark);
        return Result.OK();
    }

    @GetMapping("Test")
    public Result Test(@RequestHeader String unauthorized){
        return Result.OK();
    }
}
